//#include <lifeconfig.h>

#include <test_schwarz.hpp>

#include <string>
/**
 * This routine returns the list of options using the
 * boost::program_options library. The data returned is typically used
 * as an argument of a Life::Application subclass.
 *
 * \return the list of options
 */
inline
Life::po::options_description
makeOptions()
{
    Life::po::options_description Schwarzoptions("Schwarz options");
    Schwarzoptions.add_options()
        ("hsize", Life::po::value<double>()->default_value( 0.5 ), "taille du maillage")
        ("bccoeff", Life::po::value<double>()->default_value( 100.0 ), "coeff for weak Dirichlet conditions")
        ;
    return Schwarzoptions.add( Life::life_options() ) ;
}


/**
 * This routine defines some information about the application like
 * authors, version, or name of the application. The data returned is
 * typically used as an argument of a Life::Application subclass.
 *
 * \return some data about the application.
 */
inline
Life::AboutData
makeAbout()
{
    Life::AboutData about( "Test_Schwarz" ,
                           "Test_Schwarz" ,
                           "0.1",
                           "Test l'algorithme de Schwarz",
                           Life::AboutData::License_GPL,
                           "Copyright (c) 2009 Universite de Grenoble 1 (Joseph Fourier)");

    about.addAuthor("Chabannes Vincent", "developer", "vincent.chabannes@imag.fr", "");
   return about;

}


int
main( int argc, char** argv )
{

    using namespace Life;
    /* assertions handling */
    Life::Assert::setLog( "Test_Schwarz.assert");

    /* change parameters below */
    const int nDim = 2;
    const int nOrder = 2;

    typedef Life::Test_Schwarz<nDim, nOrder, Simplex> Test_Schwarz_type;

    /* define and run application */
    Test_Schwarz_type schwarz( argc, argv, makeAbout(), makeOptions() );
    schwarz.run();
}
